@import com.zj.whichone.bean.IndexVo;
@import com.zj.whichone.bean.Menu;
@import com.zj.whichone.bean.tree.TreeMenu;
@import com.zj.whichone.bean.tree.TreeUtil;
@args IndexVo indexVo;
<html lang="en" class="app">
<head>
	<link rel="stylesheet" type="text/css" href="@res("/static/notebook/notebook_files/font.css")">
	<link rel="stylesheet" type="text/css" href="@res("/static/notebook/notebook_files/app.v1.css")">
	<link rel="stylesheet" type="text/css" href="@res("/static/css/lanyuan.css")">

<script type="text/javascript" src="@res("/static/notebook/notebook_files/app.v1.js")"></script>
<script type="text/javascript" src="@res("/static/notebook/notebook_files/app.plugin.js")"></script>
<script type="text/javascript" src="@res("/static/js/jquery/jquery.form.js")"></script>
<script type="text/javascript" src="@res("/static/js/jquery/jquery-validation/jquery.validate.min.js")"></script>
<script type="text/javascript" src="@res("/static/js/jquery/jquery-validation/messages_cn.js")"></script>
<script type="text/javascript" src="@res("/static/js/layer-v1.9.2/layer/layer.js")"></script>
<script type="text/javascript" src="@res("/static/js/common/common.js")"></script>
<script type="text/javascript" src="@res("/static/js/common/lyGrid.js")"></script>
<script type="text/javascript" src="@res("/static/js/lanyuan/updatePassword.js")"></script>
<script type="text/javascript" src="@res("/static/js/lanyuan/update.js")"></script>
<script type="text/javascript">
    var rootPath="@url("/")";
	$(function() {
    //修改时间2015年10月13日14:32:57
    //修改在手机上点击菜单后菜单不关闭问题
    //修改人赵雷
//     alert("come in  hehe !");
    var winwidth = $("body").width();
    if(winwidth<770){
      $("#nav ul.lt li").click(function(){
        $("#nav").removeClass("nav-off-screen");
     });
    }
    //---------修改人赵雷完毕----------
		var tb = $("#loadhtml");
		tb.html(CommnUtil.loadingImg());
// 		tb.load(rootPath+"/monitor/monitor.shtml");
// 		tb.load(rootPath+"${list[0].resUrl}");
		$("[nav-n]").each(function () {
				$(this).bind("click",function(){
						var nav = $(this).attr("nav-n");
						var sn = nav.split(",");
						var html = '<li><i class="fa fa-home"></i>';
						html+='<a href="index.html">Home</a></li>';
						for(var i=0;i<sn.length-1;i++){
							html+='<li><a href="javascript:void(0)">'+sn[i]+'</a></li>';
						}
						$("#topli").html(html);
						var tb = $("#loadhtml");
						tb.html(CommnUtil.loadingImg());
						tb.load(rootPath+sn[sn.length-1]);
				});
			});
		});
</script>
</head>
<body class="" style="">
	<section class="vbox">
		<header class="bg-dark dk header navbar navbar-fixed-top-xs">
			<div class="navbar-header aside-md" >
				<a class="btn btn-link visible-xs"
					data-toggle="class:nav-off-screen,open" data-target="#nav,html">
					<i class="fa fa-bars"></i>
				</a> <a href="index.shtml#" class="navbar-brand"
					data-toggle="fullscreen"><img
					src="@res("/static/notebook/notebook_files/logo.png")" class="m-r-sm">游玩</a>
				<a class="btn btn-link visible-xs" data-toggle="dropdown"
					data-target=".nav-user"> <i class="fa fa-cog"></i>
				</a>
			</div>
			<ul class="nav navbar-nav navbar-right m-n hidden-xs nav-user">
				<li class="dropdown">
					@indexVo.getUser().getUsername(),你好,你是
					<span><font color="red">@indexVo.getUser().getRootPhrase()</font></span>
				</li>
					
				<li class="dropdown">
					<a href="index.html#" class="dropdown-toggle" data-toggle="dropdown"> 
						<span class="thumb-sm avatar pull-left"> 
							<img src="@res("/static/notebook/notebook_files/avatar.jpg")">
						</span> 
						@indexVo.getUser().getUsername()<b class="caret"></b>
					</a>
					<ul class="dropdown-menu animated fadeInRight">
						<li><a href="#" onclick="javascript:updatePasswordLayer();">密码修改</a></li>
						<li><a href="logout.html">Logout</a></li>
					</ul>
				</li>
			</ul>
		</header>
		<section>
			<section class="hbox stretch">
				<!-- .aside -->
				<aside class="bg-dark lter aside-md hidden-print hidden-xs" id="nav">
					<section class="vbox">
						<header class="header bg-primary lter text-center clearfix">
							<div class="btn-group">
							系统菜单
							</div>
						</header>
						<section class="w-f scrollable">
							<div class="slim-scroll" data-height="auto"
								data-disable-fade-out="true" data-distance="0" data-size="5px"
								data-color="#333333">
								<!-- nav -->
								<nav class="nav-primary hidden-xs">
									<ul class="nav">
										@if(indexVo!=null && indexVo.getListTreeMenu()!=null){
                           					 @for(TreeMenu treeMenu : indexVo.getListTreeMenu()){
											<!-- <li class="active"> 某一项展开-->
											<li @if(treeMenu.getMenu().getType()==0){class="active"} >
												<a hrefs="@treeMenu.getMenu().getResUrl()" @if(treeMenu.getMenu().getType()==0){class="active"} >  
														@if(treeMenu.getMenu().getType()==0){
														<i class="fa fa-dashboard icon"> 
															<b class="bg-danger"></b>
														</i>
														}
														@if(treeMenu.getMenu().getType()==1){
														<i class="fa fa-pencil-square icon"> 
															<b class="bg-warning"></b>
														</i>
														}
														@if(treeMenu.getMenu().getType()==2){
														<i class="fa fa-columns icon"> 
															<b class="bg-primary"></b>
														</i>
														}
														@if(treeMenu.getMenu().getType()==3){
														<i class="fa fa-book icon"> 
															<b class="bg-info"></b>
														</i>
														}
														@if(treeMenu.getMenu().getType()==4){
														<i class="fa fa-th-list icon"> 
															<b class="bg-success"></b>
														</i>
														}
														<span class="pull-right"> 
															<i class="fa fa-angle-down text"></i> 
															<i class="fa fa-angle-up text-active"></i>
														</span> 
														<span>@treeMenu.getMenu().getName()</span>
												</a>
												
													<!--最多只搞3级目录了，多了的话就得用递归了，技术上暂时还不能实现 -->
													@for(TreeMenu a:treeMenu.getChildTreeMenu()){
													<ul class="nav lt">
															<li class="active">
																<a href="javascript:void(0)"
																	class="active" nav-n="@treeMenu.getMenu().getName(),@a.getMenu().getName(),@a.getMenu().getResUrl()"> 
																	<i class="fa fa-angle-right" style="color:red;"></i> 
																	<span>@a.getMenu().getName()</span>
																</a>
																@for(TreeMenu b:a.getChildTreeMenu()){
																	<ul class="nav lt">
																			<li class="active">
																				<a href="javascript:void(0)"
																					class="active" nav-n="@treeMenu.getMenu().getName(),@a.getMenu().getName(),@b.getMenu().getName(),@b.getMenu().getResUrl()"> 
																					<i class="fa fa-angle-right"></i> 
																					<span>@b.getMenu().getName()</span>
																				</a>
																			</li>
																	</ul>
																}
															</li>
													</ul>
													}
											</li>
										}}
									</ul>
								</nav>
								<!-- / nav -->
							</div>
						</section>
						<footer class="footer lt hidden-xs b-t b-dark">
							<div id="chat" class="dropup">
								<section class="dropdown-menu on aside-md m-l-n">
									<section class="panel bg-white">
										<header class="panel-heading b-b b-light">Active
											chats</header>
										<div class="panel-body animated fadeInRight">
											<p class="text-sm">No active chats.</p>
											<p>
												<a href="#" class="btn btn-sm btn-default">Start a chat</a>
											</p>
										</div>
									</section>
								</section>
							</div>
							<div id="invite" class="dropup">
								<section class="dropdown-menu on aside-md m-l-n">
									<section class="panel bg-white">
									</section>
								</section>
							</div>
						</footer>
					</section>
				</aside>
				<!-- /.aside -->
				<section id="content">
					<section id="id_vbox" class="vbox">
						<ul class="breadcrumb no-border no-radius b-b b-light" id="topli">
						</ul>
						<section class="scrollable" style="margin-top: 35px;">
						<div id="loadhtml">loadhtml</div>
						</section>
					</section>
				</section>
				<aside class="bg-light lter b-l aside-md hide" id="notes">
					<div class="wrapper">Notification</div>
				</aside>
			</section>
		</section>
	</section>
	<!-- Bootstrap -->
	<div id="flotTip" style="display: none; position: absolute;"></div>
</body>
</html>